1. Field of the Invention
This invention relates to a storage system, and more particularly to caching metadata in a storage system.
2. Description of the Related Art
Storage systems often store large amounts of data and process a variety of different workloads from various numbers of clients. These storage systems typically have non-volatile storage devices which are used to store client data, and volatile memory to cache metadata used for locating the client data. As the amount of data increases, so does the amount of metadata, and determining which metadata to store in the cache(s) becomes more challenging.
Software applications, such as a logical volume manager or a disk array manager, provide a means of allocating space in storage systems. In addition, a system administrator can create units of storage groups including logical volumes. Storage virtualization provides an abstraction of logical storage from physical storage in order to access logical storage without end-users identifying physical storage. The logical storage may be accessed via a logical address space, with a volume and block number of a given request being used to generate an address within the logical address space.
To support storage virtualization, a volume manager performs input/output (I/O) redirection by translating incoming I/O requests using logical addresses from end-users into new requests using addresses associated with physical locations in the storage devices. As some storage devices include additional address translation mechanisms, such as address translation layers which may be used in solid state storage devices, the translation from a logical address to another address may not be the only or final address translation. Redirection utilizes metadata stored in one or more mapping tables. In addition, information stored in the one or more mapping tables may be used for storage deduplication
For example, in one embodiment, a data storage subsystem may be coupled to a network, and the data storage subsystem may receive read and write requests via the network from one or more client computers. The data storage subsystem may include a plurality of data storage locations on a device group including a plurality of storage devices. The data storage subsystem may also include one or more mapping tables storing a plurality of entries for translating logical addresses of received requests to physical addresses corresponding to data storage locations. Rather than storing the entirety of the mapping table(s) in the device group, portions of the mapping table may be stored in a cache for faster access, allowing some lookups to be performed more efficiently with fewer accesses to the storage devices. The mapping table(s) may be organized into pages, with each page storing a plurality of entries. Portions of the mapping table may be added and evicted from the cache in page size allocation units. In other embodiments, other allocation unit sizes may be chosen.
A typical storage system may process a variety of different types of data workloads. Some of the workloads may have random access patterns while other workloads may have more predictable access patterns. As metadata from these various workloads competes for cache space, it is challenging for the storage system to come up with efficient schemes for choosing which metadata to retain in the cache.